Fix unit tests for BESSEL functions#10
Merged
MarkBaker merged 1 commit intoPHPOffice:developfrom Aug 13, 2016
PowerKiKi:unit-tests-bessel
Merged
Fix unit tests for BESSEL functions#10MarkBaker merged 1 commit intoPHPOffice:developfrom PowerKiKi:unit-tests-bessel
MarkBaker merged 1 commit intoPHPOffice:developfrom
PowerKiKi:unit-tests-bessel
Conversation
Expected data were re-written by using LibreOffice 5 as a reference. We kept only 8 decimals, because this is the precision used in tests, and it's easier to read without scientific notation. Also a few expected values were wrong so they were changed. The correct expected values were confirmed by both LibreOffice 5 and wolframalpha.com. Finally fixed an actual bug in code were a NaN value were returned instead of the correct `#NUM!`.
8 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 5, 2024
Fix #4001. Thanks to @SlowFox71 who reported the problem and developed most of the solution. This PR adds Rich Text support to the XML reader. The Xml Spreadsheet stores Rich Text as Html tags, children of the ss:Data tag using a specific namespace. These can be parsed into a RichText object using existing method Helper/Html::toRichTextObject. There are 2 items which need special attention. First, for attributes like bold or italic, Excel uses the appropriate Html tag (e.g. `<B>`). However, for an attribute like color, Excel uses `<Font html:Color="#FF0000">`, with a prefix on the Color tag. PhpSpreadsheet's Html parser cannot cope with the prefix. The parser is changed to strip `html:` from attribute names for the Font tag. The example cited by the user used a `<BR />` to indicate a line break in the data. However, it appears that, at least some of the time, Excel will instead use ` ` to indicate a line break. The existing parser reduces one or more whitespace characters in the text to a single space, and so ` ` will wind up disappearing. I am not sure why the existing code does this, but I do know that I am not willing to break it. Instead, I've added an optional boolean parameter `$preserveWhiteSpace` to `toRichTextObject`. If false (default), the existing logic will be used; but if true, substitution for whitespace characters in the text will not happen.
9 tasks
BlackyTay
pushed a commit
to BlackyTay/PhpSpreadsheet
that referenced
this pull request
Aug 8, 2025
Fix unit tests for BESSEL functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expected data were re-written by using LibreOffice 5 as a reference.
We kept only 8 decimals, because this is the precision used in tests,
and it's easier to read without scientific notation.
Also a few expected values were wrong so they were changed. The correct
expected values were confirmed by both LibreOffice 5 and wolframalpha.com.
Finally fixed an actual bug in code were a NaN value were returned instead of
the correct
#NUM!.